<?php
// +----------------------------------------------------------------------
// | php_pk_go / substr.php [ 2023/3/9 下午9:17 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2023 zhangqiquan All rights reserved.
// +----------------------------------------------------------------------
// | Author: zhangqiquan <768617998@qq.com>
// +----------------------------------------------------------------------
$startTime = microtime(true);
$str = 'abcdefghigklmn';
$str1 = "";
for($i = 0; $i < 100000000; $i++){
    $str1 = substr($str, 0, 5);
}
echo microtime(true) - $startTime.PHP_EOL;
var_dump($str1);